<template>
  <div>
    <el-card class="box-card" shadow="always">
      <div slot="header" :class="$style.clearfix">
        <span>调价基础商品库</span>
      </div>
      <price-base-goods-header-form @onQuery="queryList" :querying="querying" :topChannelList="topChannelList"></price-base-goods-header-form>
      <el-divider></el-divider>
      <el-button type="warning" @click="onOpenEditModal(null)">新增</el-button>
      <el-button type="success" @click="onOpenImportModal">批量导入</el-button>
    </el-card>
    <el-card class="box-card" shadow="always">
      <price-base-goods-list-table
        v-bind="list"
        @pageSizeChange="pageSizeChange"
        @pageNumChange="pageNumChange"
        @onOpenEditModal="onOpenEditModal"
      ></price-base-goods-list-table>
    </el-card>
    <!-- 新增编辑对话框   -->
    <price-base-goods-edit-modal
      :visible="visible"
      :formValueString="JSON.stringify(formValue)"
      :topChannelList="topChannelList"
      width="40%"
      @close="onClose"
      @resetTable="resetTable"
    ></price-base-goods-edit-modal>
    <!--  导入对话框  -->
    <price-base-goods-import-modal
      :visible="importVisible"
      @close="onCloseImport"
      @resetTable="resetTable"
      :topChannelList="topChannelList"
    ></price-base-goods-import-modal>
  </div>
</template>

<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index.js';
export default Index;
</script>
